> newfs /dev/sd0f
newfs: /dev/sd0f: not a character-special device
/dev/sd0f: 407160 sectors in 783 cylinders of 5 tracks, 104 sectors
198.8MB in 49 cyl groups (16 c/g, 4.06MB/g, 1024 i/g)
super-block backups (for fsck -b #) at:
32, 8464, 16896, 25328, 33760, 42192, 50624, 59056,
66592, 75024, 83456, 91888, 100320, 108752, 117184, 125616,
133152, 141584, 150016, 158448, 166880, 175312, 183744, 192176,
199712, 208144, 216576, 225008, 233440, 241872, 250304, 258736,
266272, 274704, 283136, 291568, 300000, 308432, 316864, 325296,
332832, 341264, 349696, 358128, 366560, 374992, 383424, 391856,
399392,
User list - This lists the usernames of the members of that group. A user may be a member of more than one group. If an entry for a user does not appear in /etc/group
then their group is determined by the entry in the /etc/passwd
file.
To create a new group called sysadmin you would add the following line to the /etc/group
file using vi
.
sysadmin:*:21:
Note: remember to make a copy of /etc/group
before you edit it!
> cp /etc/group /etc/group.old
> vi /etc/group
If you wanted to create the sysadmin group with 3 users, Ben, Chris, and Nick you would add the following line instead.
sysadmin:*:21:ben,chris,nick
Note: If you wish a user to be able to su
to
root they must be a member of the group "wheel".
Changing the reboot command
The reboot command supplied with NetBSD reboots the machine back into
AmigaDOS. In order to reboot NetBSD without the need to reload AmigaDOS we
must create a new reboot command. Firstly we will copy the old reboot
command so we can still reboot into AmigaDOS should we require to do
so.
> cp /bin/reboot /bin/reboot.amiga
Now create the new reboot command.
echo "cp /netbsd /dev/reload" > /bin/reboot
You can now use the command reboot
to reboot NetBSD and
reboot.amiga
to reboot into AmigaDOS.
Automatically Setting up the Environment on Login
NetBSD provides a mechanism for running commands when a user logs into a machine. This is most commonly used for setting environment variables such as the search path. NetBSD looks for a file in the users home directory to execute on login. The name of the file depends upon which shell you are using. C shell (csh) users will need a .cshrc file in their home directory, most other shell users will require a file called .profile. For more information about the contents of .profile please see article 4, shells and shell scripting.
The .cshrc contains a list of commands to be executed by NetBSD. Any command can be put into this file.
Below is a .cshrc file that sets the search path, some common aliases and the prompt. This can be modified to suit your own needs. Remember that NetBSD hides files that begin with a dot, use the command ls -la
to see all files including those beginning with a dot.
alias mail Mail
set history=1000
set path=(/sbin /usr/sbin /bin /usr/bin /usr/local/X11R6.1/bin /usr/local/bin)
# directory stuff: cdpath/cd/back
set cdpath=(/sys /usr/src/{bin,sbin,usr.{bin,sbin},pgrm,lib,libexec,share,contrib,local,devel,games,old,})
setenv BLOCKSIZE 1k
alias cd 'set old=$cwd; chdir \!*'
alias h history
alias j jobs -l
alias ll ls -l
alias back 'set back=$old; set old=$cwd; cd $back; unset back; dirs'
alias z suspend
alias x exit
alias pd pushd
alias pd2 pushd +2
alias pd3 pushd +3
alias pd4 pushd +4
alias tset 'set noglob histchars=""; eval `\tset -s \!*`; unset noglob histchars'
if ($?prompt) then
set prompt="`hostname -s`# "
endif
To enable you to run X Windows and the applications on this months CD you should make sure you set the path in your .cshrc file to be the same as the one above.